public class Login {
    public String userName="admin";
    public String passWord="123456";

    public void loginUse(String userName, String passWord){
        if(!this.userName.equals(userName)){
            System.out.println("用户名错误");
            return;
        }
        if(!this.passWord.equals(passWord)){
            System.out.println("密码错误");
            return;
        }
        System.out.println("登录成功");
    }
    public static void main(String[] args) {
        Login login=new Login();
        login.loginUse("huang","123456");
    }
}
